package cn.imu.appdevexperiment2020.base;

import android.os.Bundle;
import android.util.Log;

import androidx.appcompat.app.AppCompatActivity;

import cn.imu.appdevexperiment2020.utils.ActivityUtil;

public class BaseActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // setContentView(R.layout.activity_base);
        Log.d("BaseActivity", getClass().getSimpleName());
        ActivityUtil.getInstance().addActivity(this);
        Log.d(getClass().getSimpleName(), "onCreate: run");
    }

    @Override

    protected void onDestroy() {

        super.onDestroy();

        ActivityUtil.getInstance().removeActivity(this);
        Log.d(getClass().getSimpleName(), "onDestroy: run");
    }

    @Override
    protected void onStart() {
        super.onStart();
        Log.d(getClass().getSimpleName(), "onStart: run");
    }

    @Override
    protected void onResume() {
        super.onResume();
        Log.d(getClass().getSimpleName(), "onResume: run");
    }

    @Override
    protected void onPause() {
        super.onPause();
        Log.d(getClass().getSimpleName(), "onPause: run");
    }

    @Override
    protected void onStop() {
        super.onStop();
        Log.d(getClass().getSimpleName(), "onStop: run");
    }


    @Override
    protected void onRestart() {
        super.onRestart();
        Log.d(getClass().getSimpleName(), "onRestart: run");
    }


}